﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GMap.NET.WindowsForms.Markers
{
    using System.Drawing;
    using GMap.NET.WindowsForms;
    using EkspSys.Map;

    public class GMapEndPointMarker : GMapSelectableMarker
    {
        private Color color;

        public GMapEndPointMarker(PointLatLng p, Color color)
            : base(p)
        {
            this.color = color;
        }

        public override void OnRender(Graphics g)
        {
            Brush b = new SolidBrush(color);
            g.DrawEllipse(Pen, new System.Drawing.Rectangle(LocalPosition.X, LocalPosition.Y, Size.Width, Size.Height));
            g.FillEllipse(b, new System.Drawing.Rectangle(LocalPosition.X, LocalPosition.Y, Size.Width, Size.Height));
        }
    }
}